<!DOCTYPE html>
<html>

<head lang="en">
    <meta charset="UTF-8">
    <title>html 表格导出道</title>

</head>

<body>

    <div>
        <a href="####" class="easyui-linkbutton" id="exportExcel" onclick="export_list()">导出EXCEL</a>
    </div>
    <div id="myDiv">
        <table id="suppliers">
            <thead>
                <tr class="table-nav">
                    <th class="noExl">
                        <label style="cursor: pointer;">
                            <input type="checkbox" style="margin-right: 5px;" class="all namecheck" />
                        </label>
                    </th>
                    <th class="noExl">No.</th>
                    <th class="width-8em">供应商编号</th>
                    <th>供应商名称</th>
                    <th class="width-8em">联系电话</th>
                    <th class="width-8em">外交</th>
                    <th class="width-8em">所属地区</th>
                    <th class="width-8em">有效期</th>
                    <th class="width-8em">状态</th>
                    <th style="width: 200px">操作</th>
                </tr>
            </thead>
            <tbody id="supplier_list">
                <volist name="supplier" id="vo">
                    <tr class="list list_supplier">
                        <td class="noExl">
                            <input type="checkbox" name="" style="margin-right: 5px;" id="" value="{$vo.supplier_id}" />
                        </td>
                        <td class="noExl">
                            <span class="cell-text">{$key+1}</span>
                        </td>
                        <td>
                            <span class="cell-text" title="{$vo.supplier_num}">{$vo.supplier_num}</span>
                        </td>
                        <td>
                            <span class="cell-text" title="{$vo.supplier_name}">{$vo.supplier_name}</span>
                        </td>
                        <td>
                            <span class="cell-text">{$vo.tel}</span>
                        </td>
                        <td>
                            <span class="cell-text">
                                是</span>
                        </td>
                        <td>
                            <span class="cell-text">{$vo.area_name}</span>
                        </td>
                        <td>
                            <span class="cell-text">{:date('Y-m-d',$vo['valid_day'])}</span>
                        </td>
                        <td>
                            <span class="cell-text status3">禁用</span>
                        </td>
                        <td>
                            <span class="cell-text">
                                <a href="##" class="look_sup" id="look">查看</a> |
                                <a href="##" class="edit_sup" id="edit">修改</a> |
                                <a href="##" class="delete_sup" id="edit">加入黑名单</a>
                            </span>
                        </td>
                    </tr>
                </volist>
            </tbody>
        </table>
    </div>
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="js/jquery.table2excel.js"></script>
    <script type="text/javascript">
        function export_list(){
        $("#suppliers").table2excel({
            // exclude CSS class
            exclude: ".noExl",
            name: "Worksheet Name",
            filename: "xxxxx表" ,//do not include extension
            exclude_img: true,
            exclude_links: true,
            exclude_inputs: true
        });
    }
    </script>
</body>

</html>